NEW


REM SLALOM
REM TRANSLATED FROM ALICE 4K VERSION FOR MC-10 4K

10 GOSUB 500:REM SLALOM
15 REM TABLE OF POSITIONS
16 REM   OF SKIER
20 DIM S$(1)
30 FOR I=1 TO 32
40 E$=E$+CHR$(207)
50 NEXT I
55 REM SKIER FROM LEFT
60 S$(0)=CHR$(201)
65 REM SKIER FROM RIGHT
70 S$(1)=CHR$(198)
75 REM WHITE SCREEN
80 CLS 5
85 REM INITIAL DIRECTION
86 REM    LEFT
90 D=-1
95 REM INITIAL POSITION
96 REM   OF SKIER
100 J=16
105 REM DRAW SLALOM GATES
110 P$=CHR$(181)+CHR$(207)+CHR$(207)+CHR$(170)
115 REM MAIN LOOP
117 REM
120 FOR K=1 TO 300
125 REM CALCULATE COORDINATES
126 REM    X AND Y OF SKIER
130 Y=INT(J/32)*2
140 X=(J-16*Y)*2
145 REM SKIER AT THE LEVEL
146 REM    OF A GATE?
150 IF K>=16 AND (K-5)/10=INT((K-5)/10) THEN GOSUB 350
155 REM DISPLAY A GATE?
160 IF K<284 AND K/10=INT(K/10) THEN GOSUB 400
165 REM MOVE THE SKIER
170 IF INKEY$<>"" THEN D=-D
180 J=J+D
190 IF J<2 THEN J=2
200 IF J>29 THEN J=29
210 PRINT@ 511,E$;
220 PRINT@ J,S$(D/2+0.5);
230 NEXT K
235 REM END OF THE DESCENT
240 PRINT@164,"GATE(S) FAILED :";T;
250 PRINT@230,"ANOTHER RUN (Y/N)?";
260 D$=INKEY$:IF D$="" THEN 260
270 IF D$="Y" THEN RUN
280 IF D$<>"N" THEN 260
290 CLS:PRINT
300 END
344 REM
345 REM GATE FAILED?
346 REM
350 IF POINT(X-2,Y)<>0 OR POINT(X+4,Y)<>3 THEN IF POINT(X-4,Y)<>0 OR POINT(X+2,Y)<>3 THEN T=T+1:SOUND 1,1
360 RETURN
394 REM
395 REM DISPLAY A GATE
396 REM
400 P1=RND(3)-2
410 P=P-6*P1
420 IF P<482 THEN P=488
430 IF P>506 THEN P=500
440 PRINT@ P,P$;
450 RETURN

500 CLS
510 A$="SLALOM":L=2:GOSUB 800
520 A$="TRANSLATED FROM":L=5:GOSUB 800
530 A$="THE ALICE 4K VERSION":L=6:GOSUB 800
540 A$="WHEN PLAYING, ANY NEW KEY":L=8:GOSUB 800
550 A$="PRESS CHANGES DIRECTION":L=9:GOSUB 800
560 A$="PRESS SPACE BAR TO START":L=15:GOSUB 800
570 A$=INKEY$:A=RND(1):IF A$<>" "THEN 570
580 A$=INKEY$:IF A$<>"" THEN 580
590 CLS:RETURN
800 LP=L*32+INT((32-LEN(A$))/2):PRINT@LP,A$;:RETURN
